package com.sxj.springsourcecode.springframework.factory.config;

import com.sxj.springsourcecode.springframework.factory.PropertyValues;
import lombok.Data;

/**
 * @ProjectName: spring-source-code
 * @Package: com.sxj.springsourcecode.springframework.bean
 * @ClassName: BeanDefinition
 * @Author: sxj
 * @Description:
 * @Date: 2024/2/21 10:46
 * @Version: 1.0.0
 */
@Data
public class BeanDefinition {
    private Class clz;

    private PropertyValues pvs;

    private String initMethodName;

    private String destroyMethodName;

    public BeanDefinition(Class clz) {
        this.clz = clz;
        this.pvs = new PropertyValues();
    }

    public void setPropertyValue(String name,Object value){
        this.pvs.addPropertyValue(name,value);
    }
}
